from django.conf.urls import url
from backstage.sutra import views


urlpatterns = [
    url(r'^category/list', views.CategoryList.as_view()),
    url(r'^category/(?P<sutra_id>\d+)', views.Category.as_view()),
    url(r'^category', views.Category.as_view()),
    url(r'^(?P<sutra_id>\d*)/*edition/list', views.EditionList.as_view()),
    url(r'^edition/(?P<edition_id>\d+)/page/list',
        views.EditionPageList.as_view()),
    url(
        r'^edition/(?P<edition_id>\d+)/details',
        views.EditionDetails.as_view()),
    url(r'^edition/(?P<edition_id>\d+)', views.Edition.as_view()),
    url(r'^edition/page/(?P<page_id>\d+)/scan',
        views.EditionPageScan.as_view()),
    # url(r'^edition/page/(?P<page_id>\d+)/recog',
    #     views.EditionPageRecog.as_view()),
    url(r'^edition/page/(?P<page_id>\d+)/words/position',
        views.EditionPageWordsPositon.as_view()),
    url(r'^edition/page/(?P<page_id>\d+)', views.EditionPage.as_view()),
    url(r'^edition/page', views.EditionPage.as_view()),
    url(r'^edition', views.Edition.as_view()),
    url(r'^word/image/upload', views.UploadImg.as_view()),
]
